package com.examplemartin.jpademo.service.stock;

import com.examplemartin.jpademo.dao.SummGoodDao;
import com.examplemartin.jpademo.pojo.po.good.GoodPO;
import com.examplemartin.jpademo.pojo.po.stock.SummGoodPO;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@Component
public class SummGoodService {
    @Resource
    private SummGoodDao summGoodDao;

    //查找库存信息
    public SummGoodPO findByGoodPO(GoodPO goodPO){
        return  summGoodDao.findByGoodPO(goodPO);
    }

    // 查询所有
    public List<SummGoodPO> findAll(){
        return summGoodDao.findAll();
    }

    // 设置库存
    public SummGoodPO save(SummGoodPO SummGoodPO){
        SummGoodPO save = summGoodDao.save(SummGoodPO);
        return save;
    }
}
